a = 100
b = [100]


# +=表示 num指向谁就对谁进行修改,如果num指向[100],那么就变为[100,100]
# 如果num 指向100,因为100是不可变类型,所以不能修改,所以num=num+num
def test_a_1(num):
    num += num
    print("test_a_1 " + str(num))


def test_a_2(num):
    num = num + num
    print("test_a_2 " + str(num))


test_a_1(a)
print(a)
test_a_2(a)
print(a)

def test_b_1(num):
    num += num
    print("test_b_1 " + str(num))


test_b_1(b)
print(b)

b = [100]


def test_b_2(num):
    num = num + num # ===>[100] + [100] ====>[100,100]   注意只要是num=xxx一定是num指向了一个新的地方
    print("test_b_2 " + str(num))


test_b_2(b)
print(b)
